resource.AddFile("sound/vcom/cover.wav")
//resource.AddFile("sound/vcom/enemy01.wav")
//resource.AddFile("sound/vcom/enemy02.wav")
//resource.AddFile("sound/vcom/enemy03.wav")
//resource.AddFile("sound/vcom/grenade01.wav")
//resource.AddFile("sound/vcom/grenade02.wav")
resource.AddFile("sound/vcom/help01.wav")
resource.AddFile("sound/vcom/help02.wav")
//resource.AddFile("sound/vcom/negative01.wav")
//resource.AddFile("sound/vcom/negative02.wav")
resource.AddFile("sound/vcom/no.wav")
//resource.AddFile("sound/vcom/positive01.wav")
//resource.AddFile("sound/vcom/positive02.wav")
resource.AddFile("sound/vcom/yes.wav")

concommand.Add("dm_vcom",function(ply,cmd,args)
	if !timer.IsTimer("vcompl"..ply:SteamID()) then
		if string.sub(args[1],12,12+7) == "grenade" then
			ply:EmitSound(args[1],200,100)
		else
			for k,v in pairs(player.GetAll()) do
				if v:Team() == ply:Team() then
					v:ConCommand("play "..args[1])
					v:ConCommand("say_team "..args[1])
				end
			end
		end
		print("DM: "..ply:Nick().." is on a voice com cooldown")
		timer.Create("vcompl"..ply:SteamID(),1.75,1,function()
			print("DM: "..ply:Nick().."'s voice com cooldown has ended")
			timer.Remove("vcompl"..ply:SteamID())
		end)
	end
end)